#include <iostream>
using namespace std;
const int& add(const int& op1, const int& op2, int& res){

        res  ++ ; // changing res has side effects
	res = op1+op2;
	return res;
}

int main(){

	int a = 10;
        cout << "before add:" << a << endl;
        add(a,a,a);
        cout << "after add:" << a << endl;
	return 0;
}
